home *** CD-ROM | disk | FTP | other *** search
- Path: f411.n201!not-for-mail
- Newsgroups: comp.sys.cbm
- X-Comment-To: All
- From: Pontus Berg <Pontus.Berg@p71.anet.canit.se>
- Date: Fri, 12 Jan 96 01:26:08 +0100
- Subject: Serial SPEED II
- Message-ID: <821431568@p71.f411.n201.z2.ftn>
- Organization: BoArDgasm, Farsta, Sweden
- X-FTN-AREA: CANIT_COMP_SYS_CBM
- X-FTN-MSGID: 2:201/411.71 30f60d10
- X-FTN-CHRS: IBMPC 2
- X-FTN-Tearline: Spot 1.3a #676
- X-FTN-Origin: BoArDgasm, Farsta, Sweden (2:201/411.71)
- X-FTN-SEEN-BY: 201/411
- X-FTN-PATH: 201/411
- X-FTN-PATH: 201/411
-
- The principles for transfering FAST from modem to drive! (The reverse is also possible, but I concentrated in this direction not to mess things up)
-
- Thought:
- The two SLOW part of the communications when downloading files is the serial
- ports - the modem and the drive! Assuming I stuffed the drive with my own
- recieve routine and do my own RS232 routine, there is really NO point what so
- ever in converting it to *bytes* in between... The bit to byte convertion EATS
- CPU time and the theory behind the swiftlink is to avoid this waste of the
- limited CPU resource! Assuming one does not have a SwiftLink;
-
- I haven't got a clue how the DSR/CTS/RTS/DTR's are ACTUALLY used, but see this
- as a principle that is probably all wrong implemented! This is also only for
- trasnfering FILES as chars to apeear on the screen have no rason to be in the
- drive! (Is it possible to run 2400 for screen display and f.ex. 9600 for files -
- can you set a higher baudrate in mid-conversation? I assumed you can!)
-
- What about this for transfering two bits:
-
- x_bits LDY #(Clear to send)
-
- LDX $DD01 ;4
- STY $DD01 ;4
- LDA Table1,X ;4
- STA $DD00 ;4
-
- LDX $DD01 ;4
- STY $DD01 ;4
- LDA Table2,X ;4
- STA $DD00 ;4
-
-
- This repeated 4 times would fetch 8 bits and send the bits to the drive. The
- two tables are convertions to have the data bit from the modem (bit 0) emerge at
- bit 7 in the accumulator after the read and two of them are there just to have
- one with bit 6 (serial CLK) set to 0 in one and 1 in the other...
-
- I hear you cry that there is no error check but I did think of that!
-
- Say you transfer 256 bytes this way to the drive, you let the DRIVE do the
- check if it got a valid sector or not. It sends back an ACK/NACK for the sector
- to the computer, which passes it to the modem. The computer is only a "bit
- carrier" and the drive does the intelligent part in the protocol.
-
- I guess you need to waste a few cycles of overhead before or after each byte to
- sync the drive again, especially if it has stepped to a new track.
-
- I realize this is a walk on thin ice! I take for granted that the modem always
- has things to send (a faster modem than the theoretical Xfer-rate will) as I
- don't await any signal from the modem that it is ready to send! I haven't sent
- the first "clear to send" and will have to make an exception on the last by not
- sending. (It would actually be much more easy to have the CTS right before the
- LDX but I'm not sure if the byte is returned on the bus that quick...)
-
- Assuming that this would actually work (I never coded anything like this
- before) I do a small calcualtion on how fast it would actually be in
- theorectical transfer speed from the modem to the drive I get:
-
- 63*320*50 (Cycles per PAL frame*frames per second) = 1 008 000 cycles/second
-
- The above takes 16 cycles per bit * 8 for a byte = 96 cycles
-
- 1 008 000 / 96 = 10 500 CPS!
-
-
- Comments are warmly welcome...
-
-
- /Pontus Berg, Bacchus@FairLight.COM
-
- ... I asked one of the guys at the booth to demonstrate me the multitasking
- abilities of his system and he replied "Please wait a few minutes sir,
- as soon as this disk formatting is completed, I will show you real
- multitasking..."
-